<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ taglib uri="http://www.ld.com/jsp/plugin" prefix="plugin"%>
<%@ page trimDirectiveWhitespaces="true"%>
<fmt:setLocale value="zh_CN" />
<shield:permssion type="button">
	<form method="post" action="${ctxPathA}/oa/work/weeklyReport/addOrUpdate" autocomplete="off" class="show-info"> 
		<shield:token />
		<input id="id" name="id" type="hidden" maxlength="100"
			value="${model.id }">
		<table class="tab-show">
			<colgroup>
				<col width="20%">
				<col width="">
			</colgroup>
			<tr>
				<th><label><font color="red">*</font>标题：</label></th>
				<td colspan="3"><input id="title" type="text" name="title"
					class=" required" maxlength="50" value="${username}个人周报"></td>
			</tr>
			<tr>
				<th><label><font color="red">*</font>开始日期：</label></th>
				<td><input type="text" id="startDate" name="startDate" value="${date_sstartDate}" class="Wdate  required"></td>
				<th><label><font color="red">*</font>结束日期：</label></th>
				<td><input type="text" name="endDate" id="endDate" value="${date_estartDate}" class="Wdate  required"></td>
			</tr>
			<tr>
				<th><label><font color="red">*</font>内容：</label></th>
				<td colspan="3"><textarea id="ueditorContents" name="content" class="ueditor  required" style="width: 99%; height: 300px;"maxlength="400">
				        <table>
				        <tr>
						<td width="10" valign="top""word-break:break-all;">序号</td>				    
				        <td width="400" valign="top""word-break:break-all;">内容</td>
				        <td width="164" valign="top""word-break:break-all;">工时</td>
				        <td width="164" valign="top""word-break:break-all;">开始日期</td>
				        <td width="164" valign="top""word-break:break-all;">计划完成日期</td>
				        <td width="164" valign="top""word-break:break-all;">完成度</td>
				        </tr>
				<c:forEach var="model" items="${list}" varStatus="var">
					<tr>
						<td>${var.index+1}</td>
						<td><c:out value="${model.content }" /></td>
						<td>${model.timeConsuming}</td>
						<td><fmt:formatDate value="${model.startDate }" pattern="yyyy-MM-dd "/></td>
						<td><fmt:formatDate value="${model.plannedCompletionDate }" pattern="yyyy-MM-dd "/></td>					
						<td>${model.completionDegree}%</td>
               </tr>
			</c:forEach>
			</table>
			</textarea></td>
			</tr>
			<tr>
				<th><label><font color="red">*</font>总工时：</label></th>
				<td><input type="text" id="totalHours" name="totalHours"
					class=" number required" value="${totalHours}"  maxlength="3"
					style="display: inline; width: 60%">小时</td>
			</tr>
		</table>
		<div class="taCenter">
			<input class="button" type="submit" value="提交" />
		</div>
	</form>
</shield:permssion>